package com.xianniu.ltc.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xianniu.ltc.model.entity.RobotApprovalStepDTO;
import com.xianniu.ltc.model.po.ApprovalListQueryPO;
import com.xianniu.ltc.model.vo.RobotApprovalStepVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @description 审批步骤表
 * @author wangruijie@zencor.cn
 * @date 2021-05-19
 */
@Mapper
public interface RobotApprovalStepMapper extends BaseMapper<RobotApprovalStepDTO> {

    /**
     * APP新需求-查询待处理的审批
     * @param po
     * @return
     */
    IPage<RobotApprovalStepVO> pendingApprovalList(@Param("page") Page page, @Param("po") ApprovalListQueryPO po);

    /**
     * APP新需求-查询已处理的审批
     * in 查询通过，撤回，撤销，驳回的数据
     * @param po
     * @return
     */
    IPage<RobotApprovalStepVO> processedApprovalList(@Param("page") Page page, @Param("po") ApprovalListQueryPO po);

    /**
     * APP新需求-查询已处理的审批
     * 根据审批条件专门查询 state = 通过/撤回/撤销/驳回
     * @param po
     * @return
     */
    IPage<RobotApprovalStepVO> processedApprovalListByState(@Param("page") Page page, @Param("po") ApprovalListQueryPO po);

    /**
     * APP新需求-查询我提价的审批
     * 根据审批条件专门查询 state = 通过/撤回/撤销/驳回
     * @param po
     * @return
     */
    IPage<RobotApprovalStepVO> processedApprovalListBySubmitted(@Param("page") Page page, @Param("po") ApprovalListQueryPO po);

}

